package com.gitee.kamismile.gatewayAgent.client.bootstrap;


import com.gitee.kamismile.gatewayAgent.client.handler.GateWayClientInitializer;
import com.gitee.kamismile.gatewayAgent.client.service.IGateWayClientHelper;
import com.gitee.kamismile.gatewayAgent.client.service.imp.GateWayClientHelper;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages = "com.gitee.kamismile.gatewayAgent.client")
public class ClientAgent {


    @Bean
    @ConditionalOnMissingBean(IGateWayClientHelper.class)
    public IGateWayClientHelper iGateWayClientHelper(){
        return new GateWayClientHelper();
    }

    @Bean
    @ConditionalOnMissingBean(GateWayClientInitializer.class)
    public GateWayClientInitializer gateWayClientInitializer(){
        return new GateWayClientInitializer();
    }

}
